
#@layoutT('')
#define main()

   #@formStart()

      #@queryStart('激活码')
      <input type="text" class="layui-input"  name="activeCode" placeHolder="请输入激活码"/>
      #@queryEnd()

      #@queryStart('设备分组')
      <select name="groupId"  class="layui-input" lay-search>
         <option value="">---请选择设备分组---</option>
         #for(data:deviceGroupList)
         <option value="#(data.id??)" >#(data.name??)
         </option>
         #end
      </select>
      #@queryEnd()

   #@formEnd()
   <div class='layui-row f-index-toolbar'>
      <div class='layui-col-xs12'>
         <div class="layui-btn-group">
            <button id='addBtn_' class="layui-btn layui-btn-normal layui-btn-sm">
               <i class="layui-icon">&#xe608;</i> 新增
            </button>
            <button id='refreshBtn_' class="layui-btn layui-btn-normal layui-btn-sm">
               <i class="layui-icon">&#xe669;</i> 刷新
            </button>
            <button id='deleteBtn_' class="layui-btn  layui-btn-normal layui-btn-sm">
               <i class="layui-icon">&#xe640;</i> 删除
            </button>
         </div>
      </div>
   </div>

   #@table()

#end

#define js()
<!-- 分页表格 -->
<script>
    gridArgs.title='';
    gridArgs.dataId='id';
    gridArgs.deleteUrl='#(path)/device/activecode/delete';
    gridArgs.updateUrl='#(path)/device/activecode/edit/';
    gridArgs.addUrl='#(path)/device/activecode/add';
    gridArgs.gridDivId ='maingrid';
    initGrid({id : 'maingrid'
        ,elem : '#maingrid'
        //,toolbar:'default'
        ,cellMinWidth: 100
        ,cols : [ [
				 {title: '主键',field : 'id',width : 35,checkbox : true},
				 {title:'序号',type:'numbers',width:35},
				 {title:'激活码',field:'active_code'},
                 {title:'分组',field:'group_name'},
                 {title:'备注',field:'comment'},
				 {title:'创建时间',field:'create_time'},
                 {fixed:'right',width : 180,align : 'left',toolbar : '#bar_maingrid'}
            ] ]
        ,url:"#(path)/device/activecode/list"
        ,searchForm : 'searchForm'
    });

</script>


#end



